Trust relationships in a computerized system

ABSTRACT

Methods and apparatuses for a computerized system are disclosed. A data processing device receives information from at least one source of log information in the computerized system and detects, based at least in part on said received log information, at least one security protocol related event at a first host device, the at least one security protocol related event being initiated by a second host device. Information is then stored for determination of a trust relationship record based on the detected at least one security protocol related event and information of the second host device.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority under 35 U.S.C. §119 to U.S.Provisional Application Ser. No. 61/843,809, filed Jul. 8, 2013, thedisclosure of which is incorporated herein by reference.

TECHNICAL FIELD

This invention relates to trust relationships in a computerized system.The trust relationships can associate for example with access controland encryption. Certain embodiments enable discovering, cataloguing, andanalyzing access control rights based on cryptographic keys and theiruse in possibly heterogeneous computer networks.

BACKGROUND

It is common to implement access control, confidentiality, and dataintegrity within computer networks by means of cryptography. A commonsolution is to use end-to-end encryption, i.e., to cryptographicallyprotect sessions initiated by a user or a computer program andterminated at a host device such as a server, a computer or other dataprocessing device connected to a computer network. A network host mayoffer information resources, services, and applications to users orother nodes on the network. For instance, the SSH-2 (Secure Shell 2)protocol implements end-to-end encryption. SSH-2, among other securityprotocols, can allow users to authenticate themselves by usingpublic-key cryptography.

In public key cryptography authentication schemes, keys are created inpairs comprising a private key and a public key. A user who wants to beauthenticated has to demonstrate controlling or possessing a privatekey, without disclosing the private key itself. The host towards whichthe user is authenticating is configured to accept the correspondingpublic key. When the user demonstrates being in possession of a privatekey whose public key counterpart is registered as a public key grantingaccess on the destination host, the user is allowed some type of systemaccess on the destination host.

This mechanism creates a relationship between the private key and thetarget host via the public key, as the target host allows some form ofaccess by an entity (a human operator or a computer program) who candemonstrate possessing the private key. Such relationships are calledtrust relationships. A trust relationship between a private key and ahost can be extended to include (a) the host on which the private key isstored; (b) the user who is considered to be in control of that privatekey, or a group of users; and (c) the services or a group of servicesthat are enabled for the private key, which can include for exampleunrestricted shell access or restricted system operations.

Cryptographic protocols have been used to secure end-to-endcommunications and to provide access control within computer networksfor several decades. Security-conscious organizations need to be able todiscover and catalogue existing trust relationships (rights to accessservices and other resources) within their networks. A reason for thisis that traditionally users are able to create new private-public keypairs and register them to grant access to resources, that is, to createtrust relationships, without centralized review or logging of createdrelationships. Additionally, when persons leave from organizations, itcan happen that trust relationships they have created, or were createdfor them, are left intact and even forgotten. Large organizations mayhave millions of trust relationships that are unknown, abandoned, or insome other form not accounted for.

The previously known methods for discovering trust relationships arebased on scanning network hosts for private keys and for access-grantingpublic keys. This approach can suffer from certain drawbacks. Scanningbased operation can require the discovery process to have universalaccess to all hosts within the network, making the discovery processitself a security risk. Additionally, the process can be slow as all thefile systems have to be scanned in search for cryptographic keys.Additionally, the process may not be robust enough, as keys can bestored in non-standard locations. The keys may also be scrambled orencrypted so that a discovery process may not be able to detect them.Additionally, the processing may create extra load on the computernetwork both in terms of network as well as CPU (central processingunit) use. Furthermore, the procedure may not help in direct discoveryof usage or access patterns but may only reveal static relationshipsbetween stored private keys and access-granting public keys.

SUMMARY

In accordance with an aspect there is provided a method in acomputerized system, comprising receiving at a data processing deviceinformation from at least one source of log information in thecomputerized system, detecting based at least in part on said receivedlog information at least one security protocol related event at a firsthost device, the at least one security protocol related event beinginitiated by a second host device, and storing information fordetermination of a trust relationship record based on the detected atleast one security protocol related event and information of the secondhost device.

In accordance with another aspect there is provided an apparatuscomprising at least one processor, and at least one memory includingcomputer program code, wherein the at least one memory and the computerprogram code are configured, with the at least one processor, to causethe apparatus to process log information received from at least onesource of log information in a computerized system to detect, based atleast in part on said received log information, at least one securityprotocol related event at a first host device, the at least one securityprotocol related event being initiated by a second host device, andstore information for determination of a trust relationship record basedon the detected at least one security protocol related event andinformation of the second host device.

In accordance with a further aspect a data processing device canidentify a successful login to a first host device from a second hostdevice using a public key identified by a fingerprint for authenticationbased on log information conveyed from the first host device, it isdetermined that at least one of the first host device and the secondhost device is not being managed by a management system, and a databaseis then updated to record that a key identified by the fingerprint isused outside the environment managed by the management system.

A non-transitory computer readable media for implementing the variousaspects of the invention may also be provided.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates accessing system logs and obtaining login events andtrust relationships.

FIG. 2 illustrates scanning file systems for private and public keys andprocessing information obtained.

FIG. 3 illustrates a computer system presenting data to a user in a webbrowser.

FIG. 4 illustrates producing notifications based on information obtainedfor a pair of computer hosts.

FIG. 5 illustrates a set of rules to trigger notifications based on hostclassifications.

FIG. 6 illustrates a set of rules to trigger notifications based on hostsecurity classifications.

FIG. 7 illustrates a rule to trigger notifications based on hostauthorization domains.

FIG. 8 illustrates a set of rules to trigger notifications based onvarious conditions.

FIG. 9 illustrates an arrangement of systems to monitor file systemchanges and to schedule tasks based on monitored changes.

FIG. 10 illustrates scanning directory services for public keys andprocessing information obtained.

FIG. 11 illustrates an embodiment.

DETAILED DESCRIPTION

An example of operation in accordance within embodiment will now bedescribed with reference to FIG. 1. In this embodiment a data processingdevice such as an appropriately configured computer device first obtainslog information (100) from appropriate sources of log information. Thelog information may be obtained, for example, from one or more networkhosts that potentially run security protocol server processes. The loginformation can be analysed to detect security protocol related eventswhich comprise events such as a login to a server or a communicationsession routed through an intermediate node.

Log information can be accessed, for instance, by logging remotely intoa network host with sufficient user privileges, such as administrator orroot privileges, using a remote access mechanism such as SSH (SecureShell), and reading log files on the local file system. Alternatively,or in addition, log information can be obtained by receiving one or moreonline streams of log events that are provided by a provider. Theprovider can be for example an SNMP (Simple Network Management Protocol)agent, an RFC 3164 compliant syslog server or forwarding service, orsome type of an SIEM (Security Information and Event Management System)such as Splunk™. A log event stream can pertain to one or more networkhosts, as it can be consolidated from multiple log event streams by aconsolidating service. According to a possibility log information can bealso found from one or more data bases containing such information. Thisis enabled within a computer network where a process is in place towrite log information into databases. Such databases can be, forinstance, SQL (Structured Query Language) databases such as Oracle™ orPostgres™, key-value databases such as BigTable™ or Berkeley™ DB,distributed large databases such as Cassandra™, or object databases suchas GemStone/S™.

How log data is organized within one or more such databases can varywithout having a material impact on any of the embodiments presentedhere. Different methods for accessing logs can be combined to cover forcases where different network hosts have different mechanisms forproviding log information, for example because of technical restrictionsor because of configuration.

One or more processes or services running on the network hosts can beconfigured so that the log information provided by them containsinformation about security protocol related events. For example, aserver can provide information about successful logins over a securityprotocol, or a gateway or another intermediate node can provideinformation about security protocol sessions that are routed through it.For example, an OpenSSH server can be set into a verbose logging mode bysetting the LogLevel configuration variable in the global sshd_configfile to VERBOSE. In the verbose logging mode, the OpenSSH serverprovides log information about public key fingerprints and user IDs,that is, user names on the server computer that are used to log into theserver.

Security protocols do not necessarily reveal the login name or otheridentity of the user on the originating network host. However,information about the login identity can be important, for instance, forauditing purposes. To mitigate that, a client can be configured to sendover the value of the local user environment variable. If using the SSHas an example, this can be done by an OpenSSH™ client configured to sendover the value of the local USER environment variable by setting theSendEnv configuration variable to USER in the global ssh_config file,and by adding USER to the allowed environment variables on the OpenSSHservers within the network by setting the AcceptEnv configurationvariable to USER in the global sshd_config file, and then setting theverbosity level of server logging to DEBUG2 level. This causes theclient to send over to the server the value of the USER environmentvariable on the originating host, which usually corresponds to the loginname of the user on the originating host, and causes the server toprovide the value within log information. It is worth noticing that thevalue of the USER environment variable is then overwritten by theserver, causing no material change in the security properties providedby the security protocol.

A computer device can be configured to extract successful securityprotocol login events (101) from the obtained log information. This stepcan be based on scanning obtained log information. Scanning can beprovided for example by using regular expressions or fixed string textsearch methods if log information is in textual form, regardless ofwhether log data was originally accessed by reading a textual file or byreceiving management events. In some cases, log information can bestructured across one or more multiple columns in a database. In thosecases, regular expression or fixed string search can be performed byusing such facilities provided by the database implementation, or bysearching for specific values at specific columns if, for example,security protocol login events have a unique identifier within one ofthe columns within the database. It is noted that the purpose of theseexamples is not to limit how log information might be parsed, but ratherto illustrate that it can be done.

For example, referring again to SSH, some versions of OpenSSH provide alog information line “Found matching RSA key: [key fingerprint]” when auser is attempting to log in using public key authentication, andanother log information line “Accepted public key for [user name] from[host address] port [TCP/IP port] ssh2” if the public key authenticationprocedure was successful. These two lines can be found from a sequenceof log lines by searching for matches for regular expressions “Foundmatching RSA key: ([0-9a-f:]+)” and “Accepted public key for (.*) from(.*) port ([0-9]+) ssh2”, respectively. Alternatively, a fixed stringsearch for “Found matching RSA key” and “Accepted public key” can beused instead of a regular expression search to locate the correspondinglog information events, and then fixed string search can be used tolocate the substrings that contain the user name, key fingerprint, andso on.

The security protocol can be, for example, any version of SSH (SecureShell), any version of SSL (Secure Sockets Layer), any version of TLS(Transport Layer Security), any version of Secure Telnet, SFTP (SSH FileTransfer Protocol), or FTPS (FTP over TLS/SSL), or a variant or furtherdevelopment of those or similar protocols without having a materialimpact on the applicability of the present invention.

A computer device can be configured to parse the login events (102) toobtain for each such event further information for the purposes ofgenerating trust relationship records. For example, information of atleast one of one or more public key fingerprints, an originating hostdevice network address, an originating host device network TCP/IP portnumber, a destination host device network address, an authenticated userID, an originating user ID, and a time stamp can be determined. Otheruseful information may also be obtained from the events depending onwhat information is made available by the servers providing the loginformation. Such information can be combined from multiple log eventsfrom one or more logs. For example, in the case of OpenSSH, two logevents can be combined to be able to associate a key fingerprint with anoriginating host address with high probability, referring to the examplepresented earlier.

The public key fingerprints can be in one or more formats, for example,in the hexadecimal format specified in Section 4 of RFC 4716 buy theInternet Engineering Taskforce, or in the Bubble Babble encoding.Commonly, a login event parsed from log information contains the publickey fingerprint in one format only, and it is not necessarily possibleto convert from one format to another as they can be based, for example,on different cryptographic one-way functions, such as MD5 or SHA-1.

The network addresses can be in numerical format (e.g. based on IPv4 orIPv6), or they can be qualified or relative DNS (Domain Name Service)names instead of being numerical. It also possible to use otheraddresses such as phone numbers or hardware addresses such as MAC (MediaAccess Control) addresses. In some cases, the address information can becombinations of two or more network addresses. This can be the case, forexample, when a host is behind a gateway performing network addresstranslation (NAT).

Information of the destination host address can be implicit. Theinformation may have to be deduced based on information about thenetwork host from which a given login event was received. For example,if log information is accessed by reading text files directly onindividual hosts, then typically the destination host is the host itselfand this information is not explicitly present in the log data.

In some systems, the destination host address obtained from loginformation can be the host address of a gateway instead of the realoriginating host, or it can change from time to time even when thephysical originating host does not change. For example, if there is agateway providing NAT (Network Address Translation) for connectionsthrough it, it is likely that the gateway's address appears asoriginating host address within log information. In some embodiments,log information is collected from NAT gateways and is used to map thegateway's address and the TCP/IP port number of a connection to asecurity protocol server to the address of the host behind the gatewaythat originated the connection and the original TCP/IP port number. Incase there are multiple NAT gateways behind each other, this method mayneed to be repeated multiple times until the real originating hostaddress has been found.

It is also possible to configure clients such as SSH clients asdescribed above to pass on a specific environment variable that containsan identifier that uniquely identifies the originating host device. Forexample, a computer device can be used to generate a random identifieron each network host that is stored in an environment variable in awrapper script that is executed whenever a user attempts to start theOpenSSH client. The OpenSSH servers are then configured to accept theenvironment variable, as described above. This method causes the uniqueidentifier to appear in the log information provided by the servers,allowing identification of the originating host even when the securityprotocol connection traverses through one or more NAT gateways.

The same solution can be used in the case of dynamically changing IP(Internet Protocol) addresses, for example, when computers areconfigured to obtain their IP addresses using DHCP (Dynamic HostConfiguration Protocol). Alternatively, log information from DHCPservers, or similar information obtained via other means such as bylogging into the administrative interface of one or more DHCP serversand querying them for this information, can be used to associate IPaddresses with hardware addresses such as MAC (Media Access Control)addresses. The obtained MAC addresses can be used to identify theoriginating hosts instead of their IP addresses.

A computer can be configured to form for every such parsed login event adynamic trust relationship record (103). The record can be for example adata structure, a database row, or a combination of data structures ordatabase rows. The record can comprise one or more public keyfingerprints (or identification of key(s)), source device networkaddress, destination device network address, authenticated user ID,originating user ID, and other available information. Some records maynot contain all of this data. In some embodiments, certain records mayalso include a command executed using the trust relationship, filestransferred using the trust relationship, and/or one or more timestampswhen the trust relationship was used. The command and files may beassociated with one or more of the timestamps.

A computer can be configured to store the formed dynamic trustrelationship records (104) in a format that allows for querying them,along with the most recent login time stamps pertaining to the dynamictrust relationship records in, for example, one or more databases or oneor more files.

Alternatively or in combination, a computer can store login eventsdirectly instead of translating them into dynamic trust relationshiprecords (105). A difference is that one dynamic trust relationshiprelates to one or more login events, as there can be multiple loginevents (at different times, for instance) pertaining to a single dynamictrust relationship record.

FIG. 2 relates to embodiments where a computer device is configured tofurther scan computer file systems within a computer network for privatekeys and public keys configured to grant access (200) based oninformation of the security protocol related events. The scanning can beperiodic or provided on demand. This scanning can be implemented bymaking a remote connection to one or more specific network host devices,and then systematically traversing through those file system directoriesthat are are determined to potentially contain private key files orpublic key files. Typically, the configuration files for a securityprotocol server available on a host, such as an SSH protocol server, forexample, contain information about the locations at which public keysgranting access can be located. Usually, private keys are stored atwell-known locations such as users' home directories. Alternatively, thewhole file system can be scanned, or a pre-existing index can be used tolocate files, such as a locate database on UNIX variants.

Scanning can happen at regular intervals, once, or it can be triggeredmanually, or it can be triggered by observed security protocolconnections or changes in dynamic trust relationships. For example,observing a connection from a host to another host authenticating a userwith a specific public key, represented by its fingerprint, can triggera localized scanning of only those locations on the destination hostthat are known to possibly contain access-granting public keys for thatuser.

A computer can then obtain, for each private key file found (201), oneor more fingerprints of the corresponding public key (204). This can beaccomplished by deriving the corresponding public key from the privatekey mathematically if all the necessary data for the private key isavailable (202). In some cases, private key files can be encrypted andprotected by a password, a passphrase, or some other similar mechanismthat makes it impossible for an automated scanner to be able to accessthe necessary key data. In those cases, it is possible to try to findanother file from the same file system that is known, based on its nameand relative location, to contain the corresponding public key with ahigh probability (203). For example, SSH-2 private keys are often storedin files named “id_rsa”, and the corresponding public keys are storedoften in the same directory as the private keys with the name“id_rsa.pub”.

A computer for processing the log data can be configured to, for eachprivate key for which the corresponding public key fingerprints havebeen able to be derived, store information about the private key in adatabase or some other form of storage (205). The information cancomprise the network address of the host on which the key was found, thefile system path to the private key, the owner ID for the file, theowner ID for the directory in which the file was contained, the timewhen it was scanned, the creation, last access and last modificationtime stamps as provided by the underlying operating system, ifavailable, and all the fingerprints derived for the corresponding publickey.

The computer can then also be configured, for each public key file found(206), to obtain one or more fingerprints of the key (207). Informationabout the public key can be stored in a database or some other form ofstorage (208). The information can comprise information such as thenetwork address of the host on which the key was found, the file systempath to the file containing the key, the owner ID for the file, theowner ID for the directory in which the file was contained, the timewhen it was scanned, creation, last access and last modification timestamps as provided by the underlying operating system, if available, andall the fingerprints derived for the public key.

Public keys can be stored in different formats and in different waysdepending on which version and implementation of a security protocolserver is in use. For example, it is possible that a single filecontains multiple access-granting public keys, or that everyaccess-granting public key is in a separate file but they have beencollected in a common directory. The physical organization of publickeys on a particular file system does have material impact on any of theembodiments presented here.

When private and public keys have been scanned and the correspondingloops terminate (209, 210), pairs of matching private key informationand public key information can be looked for from the storage. For eachpair of a private key and a public key that share at least one samepublic key fingerprint (if the keys agree on one of the fingerprintsthey should agree on all of them) a static trust relationship record(211) is created. The record can be a data structure, a database row, ora combination of data structures or database rows, comprising filesystem path(s) to said key(s), network address(es) of the host(s) onwhich they were found, the host of the private key being a source hostand the host of the public key being a destination host, fingerprint(s)of the public key, and the owning user ID(s) for the key file(s). Thecomputer can then store the created trust relationship records in adatabase or equivalent system (212).

A computer can be configured to mark those dynamic trust relationshipsthat correspond to host pairs and key pairs for which there is no statictrust relationship discovered as inactive. Information about when theywere deemed to have become inactive based on the time when the filesystem scan was completed may be also included. Alternatively, suchdynamic trust relationships can be removed from the database of dynamictrust relationships entirely (213).

In reference to FIG. 3, a computer system can be configured to presentthe generated dynamic trust relationship records or the static trustrelationship records or both to a human user in a human-accessible form.This can be provided, for example, via a computer display, as a remotelyaccessible web service, through a textual console display, anapplication on a mobile phone, or a combination of different interfaces.In one embodiment, a computer system (300), comprising a processor (301)and a memory (302) runs a web application server (304), such as ApacheTomcat™. The application server serves a web application consisting of abusiness logic layer (305) and a presentation layer (306). The businesslogic layer is connected to a database containing trust relationshiprecords (303) and provides data upon request to the presentation layer.The presentation layer renders the provided data into a human-readableform that is then served over a network connection (307), such as TCP/IPover Ethernet connection, to a remote computer (308). A web browser(309) can then be used to display the data to a human operator.

In reference to FIG. 4, some embodiments can process dynamic trustrelationship records or static trust relationship records or both todetect possibly unauthorized, risky, or otherwise noteworthy trustrelationships. In such embodiments, a computer is first used to look up,for one or more trust relationships, host information about the sourcehost network address (400) and host information about the destinationhost network address (401) from a configuration management database,such as BMC Atrium™. A set of rules can be then consulted to check if atrust relationship from the source host to the destination host shouldtrigger a notification (402). One or more notifications are thenpossibly produced (403).

The notifications can be alerts, reports, e-mails, phone calls, SMSes(short text messages), multimedia messages, displays in a GUI (GraphicalUser Interface), or audible signals. The notifications can trigger e.g.a plurality of audit events, management events, system log events,combinations thereof or be any other notifications similar in purpose.The notifications can be targeted to human operators, computers,services, processes, or combinations thereof. In some embodiments,mechanisms to display, filter, order, classify, save, or manage suchnotifications can be provided, as well as mechanisms to copy or reroutesuch notifications to other operators or processes based on eithermanual interaction or sets of predefined computer-processed rules, orboth.

In reference to FIG. 5, as an example, enterprise computer networkscontain often separate network zones for, e.g., development, testing,and for production purposes. In such networks, it can be useful toprohibit remote access from development to other zones and from otherzones to production zones. A set of rules can be defined to providenotifications for trust relationships that represent such prohibitedaccess paths. A computer is first used to check if a source host belongsto the development zone (500). If it does, it is then checked if thedestination host is not in the development zone (502). If that is truealso, a notification is provided (504). Otherwise, it is checked if thesource host is in the testing zone (501). If so, if the destination hostis in the production zone (503), a notification is provided (504).

In reference to FIG. 6, as another example, security-sensitiveorganizations can divide their computer networks into low-impact,medium-impact, and high-impact zones. In such networks, it can be usefulto prohibit access from a lower-impact zone to a higher-impact zone. Aset of rules can be defined to provide notifications for trustrelationships that represent such prohibited access paths. A computercan check first if a source host belongs to the low-impact zone (600).If it does, it is then checked if the destination host is not in thelow-impact zone (602). If that is true also, a notification is provided(604). Otherwise, it is checked if the source host is in themedium-impact zone (601). If so, if the destination host is in thehigh-impact zone (603), a notification is provided (604).

In reference to FIG. 7, as yet another example, computer networks can bedivided into multiple, distinct authorization domains and crossingauthorization boundaries between those zones can be considered aviolation of policy. A set of rules can be defined to trigger anotification whenever a static or a dynamic trust relationship is foundwhose source and destination hosts belong to different authorizationdomains, i.e., where the trust relationship crosses an authorizationboundary. A computer is first used to obtain the authorization domainfor the source host (700). A computer is then used to obtain theauthorization domain for the destination host (701). The domains arecompared (702), and if they differ, a notification is provided (703).

In some embodiments, a computer can trigger notifications based on otherconditions.

In reference to FIG. 8, a computer can be configured to check ifmultiple copies of a single private key have been found (800). If so, anotification can be triggered (801), for example indicating that therehas been an attack, that the key is mismanaged, that the key has beenleaked, and/or that there has been an error in system administration.

A computer can be also configured to check if an access-granting publickey found from a file system has not been used to log in during a timeperiod or to invoke some other service (802), possibly indicating thatthe key corresponds to a stale or dead trust relationship, and totrigger a notification (801) in response.

Similarly, a computer can be configured to check if a private key hasnot been used to log in during a time period or to invoke some otherservice (803), possibly indicating a stale or dead trust relationship,and to trigger a notification (801) in response to finding such a key.

A private key that is used to authorize more than one different user canindicate a security policy violation or an attack. A computer can beconfigured to check for this (804) and to provide a notificationconsequently (801).

A computer can be configured to check for a dynamic trust relationshipor login event without the corresponding static trust relationship (805)and to trigger a notification (801) if such is found, as this can meanthat the private key used to authorize a user has been deliberatelyhidden, has been lost, or that there is an unwanted or unmanaged accesspath within the computer network.

A computer can be configured to check for a dynamic trust relationshipor login event for which no approval matching the used authenticator(e.g., key identified by key fingerprint) can be found from a databaseof approved trust relationships or approved authorized keys.

A notification may be triggered if any such event is determined.

In reference to FIG. 9, in addition to scanning file systems asdescribed before, it is also possible to scan file systems for publicand private keys based on file system monitoring services. In anembodiment, one or more file systems (900) are monitored by one or morefile system monitors (901). A file system monitor is a process thatcontinuously observes file systems for file creation, file modification,and file deletion events. For example, on Linux computer systems, akernel subsystem known as Inotify is such a process. On Windows™computer systems with NTFS file systems, NTFS file system journal can bemonitored to provide file monitoring.

File system monitoring apparatus (901) comprising one or more monitoringentities can provide notifications of aforementioned file system changeevents through a notification system (902). The notification system canbe, for example, an API (application programming interface), a protocol,or a system log. The notifications can be initially filtered, forexample, so that only notifications for public and private key files areprovided, or only notifications for files that reside in locations wherepublic and private keys are known to be located or where they should belocated are provided. A scheduling system (903) is used, based on thenotifications provided, to schedule full or partial file system scans asdescribed earlier. For instance, a file containing access-grantingpublic keys can be scheduled to be scanned when file system monitoringapparatus (901) has observed that the file has been changed.

In reference to FIG. 10, similarly to the process of scanning filesystems for public keys, it is also possible to scan directory services,such as AD (Active Directory) or LDAP (Lightweight Directory AccessProtocol) directories for public keys in those cases where suchdirectories are known to possibly contain access-granting public keys orreferences to/identifiers for such keys based on processing of the logdata to determine security protocol related events. In an embodiment, acomputer is configured to scan directory services for users and serviceaccounts that have one or more access-granting public keys stored intheir directory entries either in verbatim or represented by one or moreof their fingerprints (1000). The choice of which users to scan can bebased on existing dynamic trust relationships, that is, scanning thoseusers that have been known to log in at least once, or organizationparts, such as scanning the users within a development section, or someother criteria, or it is possible to scan full directories.

For each found public key (1001), a computer can then calculate thecorresponding fingerprints (1002) and store in a database or some otherform of storage information about the public key (1003). The informationcan comprise the identity of a user in whose directory record the keywas found, the time when the record was scanned, all the fingerprintsderived for the public key, and other information present in thedirectory record. For example, information such as the person's fullname, rank, title, physical location, phone number, and e-mail addressmay be stored. Once the directory scanning has been completed (1004), acomputer can be configured to combine the obtained information withotherwise obtained information about private keys, and create (1005) andstore (1006) static trust relationship records or objects as describedearlier. Inactive dynamic trust relationships (1007) can also be markedor removed as described earlier.

FIG. 11 shows a method according to the invention in a computerizedsystem. In the method log information is received at 1100 from at leastone source of log information. The information is analyzed at 1102 todetect, based at least in part on said received log information, atleast one security protocol related event at a first host device, the atleast one security protocol related event being initiated by a secondhost device. Information for use in determination of a trustrelationship record based on the detected at least one security protocolrelated event and information of the second host device is then storedat 1104.

In accordance with an embodiment a device processing log data canidentify a successful login to a first host device from a second hostdevice using a public key identified by a fingerprint for authenticationbased on log information conveyed from the first host device. If it isdetermined that at least one of the first host device and the secondhost device is not managed by a management system, a database can beupdated to record that a key identified by the fingerprint is usedoutside the environment managed by the management system.

In accordance with a more specific embodiment scanning for acryptographic key associated with the security protocol related eventbased on the log information is provided.

The security protocol related event may comprise a login to a server ora communication session routed through an intermediate node.

The storing may comprise storing one of a trust relationship recordprovided based on the detected event and information of the detectedevent.

The log information may be analysed to obtain at least one of the timeof the security protocol related event, an user account associated withthe first host device, an identifier of the first host device, anidentifier of the second host device, a fingerprint identifying anauthenticator used for authenticating the security protocol relatedevent, and an authenticator used for authenticating the securityprotocol related event.

The log information may be analysed to obtain at least one key used forauthenticating the security protocol related event, where after at leastone fingerprint identifying the key is determined for a key configuredas granting access to at least one user account on at least one host,and the determined fingerprints are stored together with identificationof the corresponding key, identification of a user account for which thecorresponding key was configured as granting access, and anidentification of a host or host equivalence group on which thecorresponding key was configured as granting access to the user account,in a database as a key granting access to the user account on the atleast one host.

Providing the trust relationship record may comprise scanning at leastone host device or directory service for cryptographic keys that couldbe used as authenticators for users based on information of the detectedat least one event, generating, for at least one such cryptographic key,at least one fingerprint, and storing the at least one fingerprint in adatabase together with identification of a user for which thecryptographic key can be used as an authenticator.

A localized scanning of locations known to potentially containinformation of access granting public keys of the user may be triggeredin response to detection of a connection from the second host device tothe first host device by a user authenticated by a public keyrepresented by its fingerprint.

Providing of a trust relationship record may comprise detecting a loginto a first user account on the first host device and determining afingerprint of a key used for authenticating the login, and in responsethereto update of a database to indicate that a key corresponding to thefingerprint has been used for logging into the first user account on thefirst host device at the time of the login. A static trust relationshipmatching the first user account, the first host device, and thefingerprint may be identified and the database updated to indicate thatthe static trust relationship has been used at the time of the login.

In accordance with an embodiment a presentation or map presenting hostdevices originating connections is generated. The presentation can belimited to devices making most of the connections in the system, and/orto devices initiating a number of connections exceeding a threshold. Thenumber of connections can be counted for a predefined period.Information of connection initiating devices can be used to determineand/or visualise devices that are likely to be in the possession of keysand/or a substantial number of keys. This can be used to improve theheuristic capabilities of the system.

In an embodiment, a distinguished name is extracted from log data, and adistinguished name from a certificate that is used for logging in isextracted from a log record and included in a dynamic trust relationshipor login event. The distinguished name may be looked up from a directoryto obtain additional information about the certificate owner.

In some embodiments, a computer can be configured to associate dynamictrust relationship records with information obtained from scanningdirectory services. It can be assumed that if the public keyfingerprints within a dynamic trust relationship record match thefingerprints stored for a user found from a directory service, then thatdynamic trust relationship represents one or more login events by thatphysical user from the designated source host to the designateddestination host. In an embodiment, a computer is configured to finddynamic trust relationships for which no private key file has beenfound. Then the computer can check for every such relationship if adirectory entry containing an access-granting public key or one or moreof its fingerprints have been seen. If yes, the corresponding dynamictrust relationship record is marked to be “token-based”. The“token-based” mark indicates that it is possible that the actual privatekey is stored on a cryptographic token, such as a smart card. If not,the corresponding dynamic trust relationship is marked as being“agent-based”. The “agent-based” mark indicates that the private key isstored on an unknown location, potentially a remote computer, and isbeing potentially used through a key forwarding service such as the SSHAgent service. Other marks can be used instead, or some other way ofassociating the inferred information with the records.

Some embodiments can use also other information to infer whether adynamic trust relationship should be assumed to be based on smart cardsor other cryptographic tokens (token-based) or on the use of SSH agentservices or other similar services (agent-based). For example, directoryservice entries can contain information about the cryptographic tokensavailable to the corresponding users, or the use of an SSH agent can bedetected from system log information obtained from the source host.

A computer can be configured to analyze dynamic and static trustrelationships obtained by any of the aforementioned methods, tocalculate, derive, or estimate metrics and to make them available tousers or computer services in human-readable form, such as text files,graphical plots, or spreadsheets, or computer-readable formats, such asdatabase rows, XML files, plain text files, or binary encoded files.

In an embodiment, the computer is configured to calculate one or more ofthe following raw metrics:

-   -   The number of hosts into which logins are made using public-key        authentication, that is, the number of hosts that appear as        destination hosts in at least one dynamic trust relationship;    -   The number of service accounts into which logins are made using        public authentication, that is, the number of dynamic trust        relationships whose user IDs correspond to service accounts.        Whether a user ID corresponds to a service account can be        resolved, for instance, by a naming convention, or by looking up        the login shell for the user ID, or by looking that information        up from a directory service;    -   The number of human user accounts into which logins are made        using public-key authentication, that is, the number of dynamic        trust relationships whose user IDs correspond to human        operators. Whether a user ID corresponds to a human operator can        be resolved for instance by a naming convention, or looking up        the login shell for the user ID, or by looking that information        up from a directory service;    -   The number of production hosts, or development hosts, or test        hosts, or low-impact hosts, or medium-impact hosts, or        high-impact hosts, into which logins are made using public key        authentication. These metrics can be calculated by collecting        the destination hosts contained with dynamic trust relationship        records, obtaining host classification from a configuration        management database (e.g., BMC Atrium or HP Universal        Configuration Management Database), and counting the number of        hosts that have a specific host classification;    -   The number of connections from a first host classification to a        second host classification, which can be calculated by obtaining        host classification information as above and then counting the        number of connections from any source host that belongs to the        first host classification to any destination host that belongs        to the second host classification. For instance, a computer can        be used to calculate the number of connections from development        hosts to test hosts, or from test hosts to production hosts, or        from development hosts to production hosts, or from low-impact        systems to medium-impact systems, or from medium-impact systems        to high-impact systems, or from low-impact systems to        high-impact systems, or from hosts belonging to one        authorization domain to hosts belonging to another authorization        domain, or to hosts known to be audited or collecting sufficient        log data for analysis, or to hosts known not to be thus        characterized, or connections from non-disaster-recovery hosts        into disaster recovery hosts;    -   The number of connections from a first type of accounts to a        second type of accounts, which can be obtained by, for every        connection object stored, obtaining originating user ID, when        available, and authenticated user ID, finding the account types        for both user IDs as above, and then calculating the number of        connections where the originating user ID belongs to the first        type of accounts and the authenticated user ID belongs to the        second type of accounts. For instance, a computer can be used to        calculate the number of connections from any account type into        privileged accounts, or from privileged to non-privileged, or        from privileged to human operator accounts, or the number of        connections to superuser accounts;    -   The number of connections from a first type of accounts to a        second type of accounts that originate from a host belonging to        a first host classification to a host belonging to a second host        classification, a metric being a combination of the        aforementioned types of metrics. For example, a computer can be        used to calculate the number of connections from privileged        accounts from hosts that are not identified as privileged access        gateways in a configuration management database; and    -   The number of connections into accounts that are known to        collect session audit logs, or the number of connections into        accounts that are known not to collect session audit logs. Both        metrics can be calculated once it is known if a given account on        a given host is configured to collect session audit logs. That        information can be obtained, for instance, by reading local        configuration files on that host, or from a database containing        information about local network topology and the presence of        separate audit gateways.

Additionally, a computer can be configured to derive, from one or moreof any of the raw metrics presented above, time series for given timeintervals, or one or more average values, median values, values of otherfractiles, or moving averages, or interpolations or extrapolations, andother arithmetically derived metrics or series of metrics.

A computer can be also configured to present together with any of theraw orderived metrics a list of hosts, users, host classifications,accounts, or account types, or combinations thereof, included in ametric or combination of metrics, or to allow a user to interactivelydrill down data behind any of the metrics, for instance, to obtain foreach connection included in a metric, time of the login, destinationhost, user account, source host, originating user ID, public keyfingerprints, and commands executed on destination host.

In an embodiment, a computer is configured to detect hosts that do notprovide enough log information to be able to create, maintain, and/ordelete dynamic trust relationship records based on log information, andthis information is made accessible to certain users according to theprinciples described above. For example, a packet sniffer tool such asWireshark™ or Tcptrack™ can be used to detect TCP/IP connections made toknown security protocol ports, such as the TCP/IP port 22 for SSH. Aconnection from a source host to a destination host at a known securityprotocol port that transmits a significant amount of data can be deemedto be a successful security protocol connection. If the destination hostdoes not provide sufficient log information for such a connection, itcan be deemed that the destination host has not been properly configuredto provide such information. A significant amount of data means moredata than what would typically amount to a failing login attempt.

Alternatively, the configuration files for security protocol servers canbe scanned in the same manner as the key files and configuration filesthat do not properly configure enough log information to be produced ormade available can be deemed to correspond to a server that is notproviding enough log information.

A security protocol connection can originate from a host that is outsidea local network and to which there is no administrative access, or itcan terminate at such a host, or both, and at the same time theconnection can still go through a local network whose hosts can beadministered.

A protocol connection that is terminated at an outside host (hostoutside a managed network) terminates at a server whose log informationis not available. In some embodiments, log information from routers orgateways at the network perimeter (boundary of a managed network) areaccessed via the methods described above to obtain information aboutsecurity protocol connections terminated outside the managed network. Ifinformation about the originator is available, such as originating hostnetwork address, or key fingerprint used for authentication, or user IDat the originating host, a dynamic trust relationship record is createdas described above, with the outside network address used as thedestination host address; this address is obtained from the gateway atthe perimeter. The record is marked as denoting a connection terminatingbeyond the network perimeter.

A protocol connection that originated from an outside host terminates ata server whose log information can be available. In some embodiments,dynamic trust relationship records are created for such connections,with a mark denoting that the connection originated from outside thenetwork perimeter.

In an embodiment, if it is detected that one or more endpoints of aprotocol connection is outside the managed environment (which may herebe interpreted as either outside the environment from which log data isobtained or outside the set of hosts from which keys are collected fromthe file system or otherwise obtained for constructing static trustrelationships), the host(s) outside the environment may be marked as“external hosts”, and the key(s) involved in such connection(s) may bemarked as “external keys”. External keys cannot typically beautomatically rotated (changed), because a management system does nottypically have the access to external hosts so that it could change keyson them.

In some embodiments, log information can be further collected fromauditing gateways. A network can be configured so that all securityprotocol connections are forced to go through an auditing gateway, or sothat only connections coming through an auditing gateway are accepted ata destination host. An auditing gateway may be provided withcryptographic credentials that allow it to masquerade as one or moredestination hosts, allowing it to perform a managed man-in-the-middleattack and thus obtain information about secured connections that wouldnot be otherwise available. Log information collected from such auditinggateways can be combined with other collected log information, or it canbe used to lessen the need to collect log information elsewhere. Forexample, an auditing gateway can provide the same information about asecurity connection as the real destination host if the auditing gatewaycan masquerade as the destination host. In some embodiments, loginformation from auditing gateways can be thus used to supersedeinformation available from security protocol servers.

In another embodiment, a computer system, consisting of a processor, amemory, and a network interface, can be configured to execute one ormore of the methods described above or combinations thereof.

In another embodiment, a software product stored on a non-transitorycomputer-readable medium that provides computer-readable instructionscan be configured to cause a computer to perform one or more of themethods described above or combinations thereof or provide suchinstructions for downloading or transmit such instruction to one or moreother computers.

Alerts may be generated substantially identically for dynamic trustrelationships, static trust relationships, and/or login events. Whereone is described, the others are also implied as possibilities.

Many variations of the above described embodiments will be available toone skilled in the art. In particular, some operations could bereordered, combined, or interleaved, or executed in parallel, and manyof the data structures could be implemented differently. When oneelement, step, or object is specified, in many cases several elements,steps, or objects could equivalently occur. Steps in flowcharts could beimplemented, e.g., as state machine states, logic circuits, or optics inhardware components, as instructions, subprograms, or processes executedby a processor, or a combination of these and other techniques. Anyaction indicated as performed may instead be caused to be performed byanother component or computer, and for any receiving there is understoodto be corresponding sending and vice versa.

It is to be understood that the aspects and embodiments of the inventiondescribed in this specification may be used in any combination with eachother. Several of the aspects and embodiments may be combined togetherto form a further embodiment of the invention, and not all features,elements, or characteristics of an embodiment necessarily appear inother embodiments. A method, an apparatus, or a computer program productwhich is an aspect of the invention may comprise any number of theembodiments or elements of the invention described in thisspecification. Separate references to “an embodiment” or “oneembodiment” refer to particular embodiments or classes of embodiments(possibly different embodiments in each case), not necessarily allpossible embodiments of the invention. The subject matter describedherein is provided by way of illustration only and should not beconstrued as limiting.

A computer may be any general or special purpose computer, workstation,server, laptop, handheld device, smartphone, wearable computer, embeddedcomputer, a system of computers (e.g., a computer cluster, possiblycomprising many racks of computing nodes), distributed computer,computerized control system, processor, or other similar apparatuscapable of performing data processing, and may have one or moreprocessors, memories, and I/O ports of any particular type.

Apparatuses may be computers, but are not restricted to traditionalcomputers. They may also be, for example, robots, vehicles, controlsystems, instruments, games, toys, or home or office appliances.

Computer-readable media can include, e.g., computer-readable magneticdata storage media (e.g., floppies, disk drives, tapes),computer-readable optical data storage media (e.g., disks, tapes,holograms, crystals, strips), semiconductor memories (such as flashmemory, memristor memory, and various ROM and RAM technologies), mediaaccessible through an I/O interface in a computer, media accessiblethrough a network interface in a computer, networked file servers fromwhich at least some of the content can be accessed by another computer,data buffered, cached, or in transit through a computer network, or anyother media that can be accessed by a computer.

The foregoing description provides by way of exemplary and non-limitingexamples a full and informative description of the exemplary embodimentof this invention. However, various modifications and adaptations maybecome apparent to those skilled in the relevant arts in view of theforegoing description, when read in conjunction with the accompanyingdrawings and the appended claims. All such and similar modifications ofthe teachings of this invention will still fall within the spirit andscope of this invention.

What is claimed is:
 1. A method in a computerized system, comprisingreceiving at a data processing device log information from at least onesource of log information in the computerized system, detecting based atleast in part on said received log information at least one securityprotocol related event at a first host device, the at least one securityprotocol related event being initiated by a second host device, andstoring information for determination of a trust relationship recordbased on the detected at least one security protocol related event andinformation of the second host device.
 2. The method of claim 1,comprising scanning for a cryptographic key associated with the securityprotocol related event based on the log information.
 3. The method ofclaim 1, wherein the security protocol related event comprises a loginto a server or a communication session routed through an intermediatenode.
 4. The method of claim 1, wherein the storing comprises storingone of a trust relationship record provided based on the detected eventand information of the detected event.
 5. The method of claim 1,comprising analyzing the log information to obtain at least one of thetime of the security protocol related event, an user account associatedwith the first host device, an identifier of the first host device, anidentifier of the second host device, a fingerprint identifying anauthenticator used for authenticating the security protocol relatedevent, and an authenticator used for authenticating the securityprotocol related event.
 6. The method of claim 1, further comprising:analyzing the log information to obtain at least one key used forauthenticating the security protocol related event, determining, for akey configured as granting access to at least one user account on atleast one host, at least one fingerprint identifying the key, andstoring determined fingerprints together with identification of thecorresponding key, identification of a user account for which thecorresponding key was configured as granting access, and anidentification of a host or host equivalence group on which thecorresponding key was configured as granting access to the user account,in a database as a key granting access to the user account on the atleast one host.
 7. The method of claim 1, wherein the providing thetrust relationship record comprises: scanning at least one host deviceor directory service for cryptographic keys that could be used asauthenticators for users based on information of the detected at leastone event; generating, for at least one such cryptographic key, at leastone fingerprint; and storing the at least one fingerprint in a databasetogether with identification of a user for which the cryptographic keycan be used as an authenticator.
 8. The method of claim 1, comprisingtriggering, in response to detection of a connection from the secondhost device to the first host device by a user authenticated by a publickey represented by its fingerprint, a localized scanning of locationsknown to potentially contain information of access granting public keysof the user.
 9. The method of claim 1, wherein providing of the trustrelationship record comprises detecting a login to a first user accounton the first host device and determining a fingerprint of a key used forauthenticating the login, and in response thereto updating a database toindicate that a key corresponding to the fingerprint has been used forlogging into the first user account on the first host device at the timeof the login.
 10. The method of claim 9, further comprising: identifyinga static trust relationship matching the first user account, the firsthost device, and the fingerprint; and updating the database to indicatethat the static trust relationship has been used at the time of thelogin.
 11. The method of claim 1, comprising receiving log informationfrom a plurality of host devices, analyzing the log information toidentify logins that use public-key authentication, and based on theanalyzing, estimating at least one of the following metrics: the numberof hosts into which logins are made using public-key authentication; thenumber of service accounts into which logins are made using public-keyauthentication; the number of human user accounts into which logins aremade using public-key authentication; the number of production hostsinto which logins are made using public-key authentication; the numberof development hosts into which logins are made using public-keyauthentication; the number of test hosts into which logins are madeusing public-key authentication; the number of distinct public keys usedfor public-key authentication; the number of times public-keyauthentication is used on the plurality of hosts during; the number ofconnections into production hosts from test or development hosts usingpublic-key authentication; the number of connections into privilegedaccounts; the number of connections into privileged accounts fromnon-privileged accounts; the number of connections into privilegedaccounts from human user accounts; the number of connections intoprivileged accounts from hosts that are not identified as privilegedaccess gateways; the number of connections into privileged accounts thathave session audit log collected; the number of connections intoprivileged accounts that do not have session audit log collected; thenumber of connections into superuser accounts; the number of hosts knownto be configured to collect sufficient log data for analysis; the numberof connections from non-disaster-recovery hosts into disaster recoveryhosts; and the number of hosts known to not be configured to collectsufficient log data for analysis.
 12. The method of claim 1, comprisingdetermining a pair of public and private keys based on matchingfingerprint information associated with the keys, and creating a trustrelationship record accordingly.
 13. The method of claim 1, comprisinggenerating a presentation based on said information for determination ofa trust relationship record, wherein the presentation providesinformation of at least one of generated trust relationship records,host devices originating at least a predefined number of connections,and host devices originating most connections.
 14. The method of claim1, comprising generating the trust relationship record, and determiningbased on a predefined rule and the generated trust relationship recordif a notification is to be communicated.
 15. The method of claim 1,comprising: identifying a successful login to the first host deviceusing a network access protocol from the log information; determiningthat the log information contains insufficient information to identifyan authenticator used for authenticating the login; and generating anotification that the first host device needs to be reconfigured toinclude sufficient data for identifying the authenticator used forauthenticating the login.
 16. An apparatus comprising at least oneprocessor, and at least one memory including computer program code,wherein the at least one memory and the computer program code areconfigured, with the at least one processor, to cause the apparatus toprocess log information received from at least one source of loginformation in a computerized system to detect, based at least in parton said received log information, at least one security protocol relatedevent at a first host device, the at least one security protocol relatedevent being initiated by a second host device, and store information fordetermination of a trust relationship record based on the detected atleast one security protocol related event and information of the secondhost device.
 20. The apparatus of claim 19, configured to scan for acryptographic key associated with the security protocol related eventbased on the log information.
 21. The apparatus of claim 19, wherein thesecurity protocol related event comprises a login to a server or acommunication session routed through an intermediate node.
 22. Theapparatus of claim 19, configured to store information of one of a trustrelationship record provided based on the detected event and informationof the detected event.
 23. The apparatus of claim 19, configured toanalyze the log information to obtain at least one of the time of thesecurity protocol related event, an user account associated with thefirst host device, an identifier of the first host device, an identifierof the second host device, a fingerprint identifying an authenticatorused for authenticating the security protocol related event, and anauthenticator used for authenticating the security protocol relatedevent.
 24. The apparatus of claim 19, configured to obtain, based on thelog information, at least one key used for authenticating the securityprotocol related event, determine, for keys configured as grantingaccess to at least one user account on at least one host, at least onefingerprint identifying the key, and store determined fingerprintstogether with identification of the corresponding key, identification ofa user account for which the corresponding key was configured asgranting access, and an identification of a host or host equivalencegroup on which the corresponding key was configured as granting accessto the user account, in a database as a key granting access to the useraccount on the at least one host.
 25. The apparatus of claim 19,configured to trigger, in response to detection of a connection from thesecond host device to the first host device by a user authenticated by apublic key represented by its fingerprint, a localized scanning oflocations known to potentially contain information of access grantingpublic keys of the user.
 26. The apparatus of claim 19, configured todetecting a login to a first user account on the first host device anddetermine a fingerprint of a key used for authenticating the login, andin response thereto update a database to indicate that a keycorresponding to the fingerprint has been used for logging into thefirst user account on the first host device at the time of the login.27. The apparatus of claim 19, configured to determine pairs of publicand private keys based on matching fingerprint information associatedwith the keys, and create a trust relationship record accordingly. 28.The apparatus of claim 19, configured to generate a trust relationshiprecords, and determine based on a predefined rule and the generatedtrust relationship record if a notification is to be communicated.
 29. Amethod comprising: identifying by a data processing device a successfullogin to a first host device from a second host device using a publickey identified by a fingerprint for authentication based on loginformation conveyed from the first host device; determining that atleast one of the first host device and the second host device is notbeing managed by a management system; and updating a database to recordthat a key identified by the fingerprint is used outside the environmentmanaged by the management system.